Skip to content

fix: Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform#2039

Closed
11BelowStudio wants to merge 5 commits intoUnity-Technologies:developfrom
11BelowStudio:patch-2
Closed

fix: Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform#2039
11BelowStudio wants to merge 5 commits intoUnity-Technologies:developfrom
11BelowStudio:patch-2

Conversation

@11BelowStudio
Copy link
Copy Markdown

@11BelowStudio 11BelowStudio commented Jun 23, 2022

Documenting #2006, and I've re-added NetworkTransform.OnIsServerAuthoritatitive() but with an 'Obsolete' tag on it, so people know to use NetworkTransform.OnIsServerAuthoritative() instead, and this time it's actually mentioned in the changelog.

It'll probably be safe to remove the obsolete NetworkTransform.OnIsServerAuthoritatitive() entirely in pre-11, but in the meantime this explicitly tells users to not use it, giving them an opportunity to fix their code to not use it.

This is to prevent further instances of #2037.

Changelog

  • Fixed: Re-added NetworkTransform.OnIsServerAuthoritatitive() so it can be marked as obsolete, to avoid unexpected cryptic compiler errors due to the sudden lack of that method (such as Pre 10 ClientNetworkTransform error #2037).
    • The new method is still called within NetworkTransform. The old method is only still here so things that still override that method get given an error message.
  • Fixed: Updated changelog to explicitly state that NetworkTransform.OnIsServerAuthoritatitive() has been replaced by NetworkTransform.OnIsServerAuthoritative().
  • Deprecated: NetworkTransform.OnIsServerAuthoritatitive() is obsolete (due to a typo in method name). Please use NetworkTransform.OnIsServerAuthoritative() instead.

Testing and Documentation

  • Includes edits to existing public API documentation.

Deprecated API

  • An [Obsolete] attribute was added along with a (RemovedAfter yyyy-mm-dd) entry.
  • An [api updater] was added.
  • Deprecation of the API is explained in the CHANGELOG.
  • The users can understand why this API was removed and what they should use instead.

@11BelowStudio 11BelowStudio requested a review from a team as a code owner June 23, 2022 16:36
@11BelowStudio 11BelowStudio changed the title Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform fix: Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform Jun 23, 2022
actually making the old obsolete OnIsServerAuthoritatitive() not virtual and also throw an exception when called, just to make it abundantly clear to anyone who may be tempted to call/override it anyway that they shouldn't be doing that.
jeffreyrainy added a commit that referenced this pull request Jun 23, 2022
@0xFA11
Copy link
Copy Markdown
Contributor

0xFA11 commented Jun 24, 2022

since we weren't fully released, we weren't API-stable. there may or may not be pre.11 soon, I think we will not get an obsolete API back in now.

@0xFA11 0xFA11 closed this Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants